<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="java.sql.*" %>
<%@ page contentType="text/html; charset=utf-8"%>
<jsp:useBean id="usercheck" class="bean.loginbean"></jsp:useBean>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>登录检测</title>
</head>
<body>
 <%
 	String name     =request.getParameter("name");
	String password =request.getParameter("password");

   try{
    	
    	if(usercheck.logincheck(name,password)){
    		session.setAttribute("username",name);
    	    response.sendRedirect("login_success.jsp"); 
        }else{
        	response.sendRedirect("login_failed.jsp");
        }     
}catch(Exception ex){
   ex.printStackTrace();
}
     
%>
 
 
</body>
</html>